package com.gang.music.system.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author gang
 * @since 2017-10-26
 */
@TableName("pt_song_info")
public class SongInfo extends Model<SongInfo> {

    private static final long serialVersionUID = 1L;

	private Long id;
	@TableField("day_amout")
	private Long dayAmout = 0l;
	@TableField("week_amout")
	private Long weekAmout = 0l;
	@TableField("month_amout")
	private Long monthAmout = 0l;
	@TableField("collect_amout")
	private Long collectAmout = 0l;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getDayAmout() {
		return dayAmout;
	}

	public void setDayAmout(Long dayAmout) {
		this.dayAmout = dayAmout;
	}

	public Long getWeekAmout() {
		return weekAmout;
	}

	public void setWeekAmout(Long weekAmout) {
		this.weekAmout = weekAmout;
	}

	public Long getMonthAmout() {
		return monthAmout;
	}

	public void setMonthAmout(Long monthAmout) {
		this.monthAmout = monthAmout;
	}

	public Long getCollectAmout() {
		return collectAmout;
	}

	public void setCollectAmout(Long collectAmout) {
		this.collectAmout = collectAmout;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
	
	public void increasePlayTime() {
		
		this.dayAmout = this.dayAmout + 1;
		this.weekAmout = this.weekAmout + 1;
		this.monthAmout = this.monthAmout + 1;
	}

	@Override
	public String toString() {
		return "PtSongInfo{" +
			"id=" + id +
			", dayAmout=" + dayAmout +
			", weekAmout=" + weekAmout +
			", monthAmout=" + monthAmout +
			", collectAmout=" + collectAmout +
			"}";
	}
}
